#define(DBTable table)
package ${basePkg}.model;

import java.util.*;
import com.jfinal.plugin.activerecord.*;

${include("/copyright_class.include")}
@SuppressWarnings("serial")
public class ${className} extends Model<${className}> {

	public static final String TABLE_NAME = "${table.sqlName}";
	public static final String PRIMARY_KEY = "${table.primaryKey}";

	#for (column : table.columns)
	// "${column.sqlName}" -> ${column.remarks}
	public static final String FIELD_${column.sqlName} = "${column.sqlName}";
	#end

	public static final ${className} dao = new ${className}();

	#for (column : table.columns)
	/**
	 * "${column.sqlName}" -> ${column.remarks}
	 */
	public ${column.javaType} get${column.methodName}(){
		return get(FIELD_${column.sqlName});
	}
	/**
	 * "${column.sqlName}" -> ${column.remarks}
 	*/
	public void set${column.methodName}(${column.javaType} ${column.paraName}){
		set(FIELD_${column.sqlName}, ${column.paraName});
	}

	#end



		#for (column : table.columns)
		model.set${column.methodName}(r.get${column.methodName}());
		#end

		//以下内容mvc适用<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

		#for (column : table.columns)
		// "${column.sqlName}" -> ${column.remarks}
		private ${column.javaType} ${column.paraName};

		#end


		#for (column : table.columns)
		/**
		 * "${column.sqlName}" -> ${column.remarks}
		 */
		public ${column.javaType} get${column.methodName}(){
				return ${column.paraName};
		}

		/**
		 * "${column.sqlName}" -> ${column.remarks}
		 */
		public void set${column.methodName}(${column.javaType} ${column.paraName}){
				this.${column.paraName} = ${column.paraName};
		}
		#end


}